<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>列表的增删</title>
	</head>
	<body>
		<input type="button" value="增加"  onclick="sum()"/>
		<input type="button" value="删除" onclick="de()" />
		<input  id="show"  type="text" />
		<ul id="ul"></ul>
		<script type="text/javascript">
			var show=document.getElementById('show');
			var ul=document.getElementById('ul')
			function sum(){
				var li=document.createElement('li')
				li.innerHTML=show.value;
				ul.appendChild(li)
			}
			function de(){
				ul.lastElementChild.remove();
			}
		</script>
		
	</body>
</html>
